import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule,Routes } from '@angular/router';
import { DetailViewComponent } from './detail-view/detail-view.component';
import { IndexViewComponent } from './index-view/index-view.component';




const routes:Routes =[

  {path:'detail/:id',component:DetailViewComponent},
  {path:'',component:IndexViewComponent},
  { path: '', redirectTo: '', pathMatch: 'full' }

]




@NgModule({
  declarations: [],
  imports: [
    RouterModule.forRoot(routes)
  ],
  exports: [RouterModule]
})
export class AppRoutimgModule { }
